package com.damie.utils;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 消费消息
 */
@Component
@RocketMQMessageListener(topic = "damie",consumerGroup = "client",consumeMode = ConsumeMode.ORDERLY)
public class MyRocket implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("消费消息：==》"+s);
    }
}
